﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="TR_Competencies.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.TR_Competencies" %>

<%@ Register Src="../Controls/user.ascx" TagName="user" TagPrefix="uc1" %>
<asp:Content ID="ContentTRCompetencies" runat="server" contentplaceholderid="ContentPlaceHolder1">
<link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">        
            <script type="text/javascript">
                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
                                
            </script>       
    </telerik:RadCodeBlock>

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="grdTRCompetencies">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdTRCompetencies" LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>    
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <telerik:RadWindow ID="ProjectDtls" runat="server" ShowContentDuringLoad="false"
                VisibleStatusbar="false" Title="-" Width="1050px" Height="600px" Modal="true"
                Behaviors="Close">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    <asp:Panel ID="TRCompetencies" runat="server">
        <table width="1000" cellpadding="0" cellspacing="0">
            <tr> 
                <td valign="top">
                    <uc1:user ID="user1" runat="server" />
                </td>
                <td width="20">
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <div class="moduleDivSlim1000x450">  
                       <div class="moduleDivBottom1000">
                            <table align="center" width="980px">
                                <tr>
                                    <td align="left" class="tableHeader">
                                        ประเภทสมรรภนะ
                                    </td>
                                </tr>
                            </table>
                            
                           <table align="center" style="width: 980px" style="Height: 300px">
                                <tr>
                                    <td>                                   
                                        <asp:Panel ID="tblTRCompetencies" 
                                            runat="server" 
                                            align="center" 
                                            Height="390px" 
                                            ScrollBars="Auto" 
                                            Width="980px">                                                                                            
                                            <telerik:RadGrid ID="grdTRCompetencies" 
                                                runat="server" 
                                                align="center" 
                                                AllowAutomaticDeletes="True" 
                                                AllowFilteringByColumn="True" 
                                                AllowMultiRowEdit="True" 
                                                AllowMultiRowSelection="True" 
                                                AllowPaging="True" 
                                                AllowSorting="True" 
                                                AutoGenerateColumns="False" 
                                                EnableAJAX="True" 
                                                EnableAJAXLoadingTemplate="True" 
                                                GridLines="None" 
                                                Height="380px" 
                                                Skin="Outlook"                                                
                                                Width="965px">                                                                                                                                                                                                                                                     
                                                <MasterTableView 
                                                    AllowMultiColumnSorting="True" 
                                                    CellSpacing="-1" 
                                                    ClientDataKeyNames="request_seq" 
                                                    CommandItemDisplay="Top"                                                         
                                                    DataKeyNames="request_seq" 
                                                    InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                                                    NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                                                    <CommandItemTemplate>
                                                        <div  align="left" class="tableDetailHeader">
                                                            <table>
                                                                <tr>
                                                                    <td align="right">
                                                                        <asp:Button id="btnReceive" 
                                                                            onclick="btnReceive_OnClick"                                                                                                                                                                                                                              
                                                                            runat="server" Width="80px" 
                                                                            CssClass="button" Text="รับเรื่อง" 
                                                                            Height="23px">
                                                                        </asp:Button>                                                                        
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </div>                                                                
                                                    </CommandItemTemplate>
                                                    <Columns>
                                                        <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
                                                            <HeaderStyle HorizontalAlign="Center" Width="20px" />
                                                             <ItemStyle HorizontalAlign="Center" Width="20px" />
                                                        </telerik:GridClientSelectColumn> 
                                                       <telerik:GridEditCommandColumn 
                                                            EditText = "คลิกเพื่อแก้ไขรายการ"
                                                            ButtonType="ImageButton">
                                                             <HeaderStyle HorizontalAlign="Center" Width="20px" />
                                                             <ItemStyle HorizontalAlign="Center" Width="20px" />
                                                        </telerik:GridEditCommandColumn>
                                                        <telerik:GridButtonColumn 
                                                            ButtonType="ImageButton" 
                                                            CommandName="Delete" 
                                                            ConfirmDialogType="RadWindow" 
                                                            ConfirmText="ลบข้อมูลที่เลือก?" 
                                                            ItemStyle-Width="15" 
                                                            Text="คลิกเพื่อลบรายการ" 
                                                            UniqueName="column1">
                                                            <HeaderStyle HorizontalAlign="Center" Width="20px" />
                                                            <ItemStyle HorizontalAlign="Center" Width="20px"/>
                                                        </telerik:GridButtonColumn>                                                                                       
                                                        <telerik:GridBoundColumn
                                                            DataField="training_status_descr" 
                                                            HeaderText="รหัส" 
                                                            AutoPostBackOnFilter="true" 
                                                            CurrentFilterFunction="Contains" 
                                                            FilterControlWidth="100%"  
                                                            ShowFilterIcon="false" 
                                                            UniqueName="training_status_descr">
                                                            <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn
                                                            DataField="training" 
                                                            HeaderText="ชื่อสมรรถนะ"
                                                            AutoPostBackOnFilter="true" 
                                                            CurrentFilterFunction="Contains" 
                                                            FilterControlWidth="100%"  
                                                            ShowFilterIcon="false" 
                                                            UniqueName="training">
                                                            <HeaderStyle HorizontalAlign="Center" Width="150px" />
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn 
                                                            DataField="requested_wn"
                                                            HeaderText="ประเภทสมรรถนะ "
                                                            CurrentFilterFunction="Contains"
                                                            AutoPostBackOnFilter="true"  
                                                            FilterControlWidth="100%" 
                                                            ShowFilterIcon="false" 
                                                            UniqueName="requested_wn">
                                                            <HeaderStyle HorizontalAlign="Center" Width="200px" />                                                           
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn
                                                            DataField="training_status_des"
                                                            HeaderText="หมายเหตุ"
                                                            AutoPostBackOnFilter="true" 
                                                            CurrentFilterFunction="Contains"  
                                                            FilterControlWidth="100%"  
                                                            ShowFilterIcon="false" 
                                                            UniqueName="training_status_des">
                                                            <HeaderStyle HorizontalAlign="Center"/>
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn 
                                                            DataField="request_seq" 
                                                            UniqueName="request_seq" 
                                                            Visible="false">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn 
                                                            DataField="status_seq" 
                                                            UniqueName="status_seq" 
                                                            Visible="false">
                                                        </telerik:GridBoundColumn> 
                                                    </Columns>
                                                    <PagerStyle 
                                                        AlwaysVisible="true" 
                                                        FirstPageToolTip="กลับหน้าแรก" 
                                                        LastPageToolTip="ไปหน้าสุดท้าย" 
                                                        Mode="NumericPages" 
                                                        NextPagesToolTip="หน้าถัดไป" 
                                                        NextPageToolTip="หน้าถัดไป" 
                                                        PrevPagesToolTip="ย้อนกลับ" 
                                                        PrevPageToolTip="ย้อนกลับ" />
                                                </MasterTableView>
                                                <ClientSettings>
                                                    <Selecting AllowRowSelect="true" />
                                                    <Scrolling AllowScroll="true" UseStaticHeaders="True" />
                                                </ClientSettings>
                                            </telerik:RadGrid>
                                        </asp:Panel>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
